import axios from '~/plugins/axios';


/**
 * 新增角色
 *
 */
export const addNewRole = function ({commit, state}, preload) {
    return axios.post(process.env.baseUrl + "/departmentrole/insert",preload)
}


/**
 * 查询角色详情
 *
 */
export const queryRole = function ({commit, state}, preload) {
   return axios.get(process.env.baseUrl + "/departmentrole/query",{
        params: preload
    })

}

/**
 * 编辑角色
 *
 */
export const editRole = function ({commit, state}, preload) {
    return axios.post(process.env.baseUrl + "/departmentrole/update", preload)

}

/**
 * 删除角色
 *
 */
export const deleteRole = function ({commit, state}, preload) {
    return axios.post(process.env.baseUrl + "/departmentrole/delete",preload)

}





